package com.luckyframe.project.jmeter.jmeterNodeJobRel.service;

import com.luckyframe.common.support.Convert;
import com.luckyframe.project.jmeter.jmeterNodeJobRel.domain.JmeterNodeJobRel;
import com.luckyframe.project.jmeter.jmeterNodeJobRel.mapper.JmeterNodeJobRelMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 节点任务 服务层实现
 * 
 * @author lancelot
 * @date 2020-12-07
 */
@Service
public class JmeterNodeJobRelServiceImpl implements IJmeterNodeJobRelService 
{
	@Autowired
	private JmeterNodeJobRelMapper jmeterNodeJobRelMapper;

	/**
     * 查询节点任务信息
     * 
     * @param id 节点任务ID 主键ID
     * @return 节点任务信息 基础信息
     */
    @Override
	public JmeterNodeJobRel selectJmeterNodeJobRelById(Long id)
	{
	    return jmeterNodeJobRelMapper.selectJmeterNodeJobRelById(id);
	}
	
	/**
     * 查询节点任务列表
     * 
     * @param jmeterNodeJobRel 节点任务信息 基础信息
     * @return 节点任务集合
     */
	@Override
	public List<JmeterNodeJobRel> selectJmeterNodeJobRelList(JmeterNodeJobRel jmeterNodeJobRel)
	{
	    return jmeterNodeJobRelMapper.selectJmeterNodeJobRelList(jmeterNodeJobRel);
	}
	
    /**
     * 新增节点任务
     * 
     * @param jmeterNodeJobRel 节点任务信息 基础信息
     * @return 结果
     */
	@Override
	public int insertJmeterNodeJobRel(JmeterNodeJobRel jmeterNodeJobRel)
	{
	    return jmeterNodeJobRelMapper.insertJmeterNodeJobRel(jmeterNodeJobRel);
	}
	
	/**
     * 修改节点任务
     * 
     * @param jmeterNodeJobRel 节点任务信息 基础信息
     * @return 结果
     */
	@Override
	public int updateJmeterNodeJobRel(JmeterNodeJobRel jmeterNodeJobRel)
	{
	    return jmeterNodeJobRelMapper.updateJmeterNodeJobRel(jmeterNodeJobRel);
	}

	/**
     * 删除节点任务对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteJmeterNodeJobRelByIds(String ids)
	{
		return jmeterNodeJobRelMapper.deleteJmeterNodeJobRelByIds(Convert.toStrArray(ids));
	}

	@Override
	public JmeterNodeJobRel selectByNodeId(Long id) {
		return jmeterNodeJobRelMapper.selectByNodeId(id);
	}

}
